﻿/*
*** Coded with loving care by Mat at Demotive ***
***	"Toiling since '75" | September 2009      ***
*** .......... www.demotive.com ............. ***
*/

// Cufon
var Cufon = (function() {
    var api = function() { return api.replace.apply(null, arguments); }; var DOM = api.DOM = { ready: (function() {
        var complete = false, readyStatus = { loaded: 1, complete: 1 }; var queue = [], perform = function() { if (complete) return; complete = true; for (var fn; fn = queue.shift(); fn()); }; if (document.addEventListener) { document.addEventListener('DOMContentLoaded', perform, false); window.addEventListener('pageshow', perform, false); }
        if (!window.opera && document.readyState) (function() { readyStatus[document.readyState] ? perform() : setTimeout(arguments.callee, 10); })(); if (document.readyState && document.createStyleSheet) (function() {
            try { document.body.doScroll('left'); perform(); }
            catch (e) { setTimeout(arguments.callee, 1); } 
        })(); addEvent(window, 'load', perform); return function(listener) { if (!arguments.length) perform(); else complete ? listener() : queue.push(listener); };
    })(), root: function() { return document.documentElement || document.body; } 
    }; var CSS = api.CSS = { Size: function(value, base) { this.value = parseFloat(value); this.unit = String(value).match(/[a-z%]*$/)[0] || 'px'; this.convert = function(value) { return value / base * this.value; }; this.convertFrom = function(value) { return value / this.value * base; }; this.toString = function() { return this.value + this.unit; }; }, addClass: function(el, className) { var current = el.className; el.className = current + (current && ' ') + className; return el; }, color: cached(function(value) { var parsed = {}; parsed.color = value.replace(/^rgba\((.*?),\s*([\d.]+)\)/, function($0, $1, $2) { parsed.opacity = parseFloat($2); return 'rgb(' + $1 + ')'; }); return parsed; }), fontStretch: cached(function(value) { if (typeof value == 'number') return value; if (/%$/.test(value)) return parseFloat(value) / 100; return { 'ultra-condensed': 0.5, 'extra-condensed': 0.625, condensed: 0.75, 'semi-condensed': 0.875, 'semi-expanded': 1.125, expanded: 1.25, 'extra-expanded': 1.5, 'ultra-expanded': 2}[value] || 1; }), getStyle: function(el) { var view = document.defaultView; if (view && view.getComputedStyle) return new Style(view.getComputedStyle(el, null)); if (el.currentStyle) return new Style(el.currentStyle); return new Style(el.style); }, gradient: cached(function(value) {
        var gradient = { id: value, type: value.match(/^-([a-z]+)-gradient\(/)[1], stops: [] }, colors = value.substr(value.indexOf('(')).match(/([\d.]+=)?(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)/ig); for (var i = 0, l = colors.length, stop; i < l; ++i) { stop = colors[i].split('=', 2).reverse(); gradient.stops.push([stop[1] || i / (l - 1), stop[0]]); }
        return gradient;
    }), hasClass: function(el, className) { return RegExp('(?:^|\\s)' + className + '(?=\\s|$)').test(el.className); }, quotedList: cached(function(value) { var list = [], re = /\s*((["'])([\s\S]*?[^\\])\2|[^,]+)\s*/g, match; while (match = re.exec(value)) list.push(match[3] || match[1]); return list; }), recognizesMedia: cached(function(media) {
        var el = document.createElement('style'), sheet, container, supported; el.type = 'text/css'; el.media = media; try { el.appendChild(document.createTextNode('/**/')); } catch (e) { }
        container = elementsByTagName('head')[0]; container.insertBefore(el, container.firstChild); sheet = (el.sheet || el.styleSheet); supported = sheet && !sheet.disabled; container.removeChild(el); return supported;
    }), removeClass: function(el, className) { var re = RegExp('(?:^|\\s+)' + className + '(?=\\s|$)', 'g'); el.className = el.className.replace(re, ''); return el; }, supports: function(property, value) { var checker = document.createElement('span').style; if (checker[property] === undefined) return false; checker[property] = value; return checker[property] === value; }, textAlign: function(word, style, position, wordCount) {
        if (style.get('textAlign') == 'right') { if (position > 0) word = ' ' + word; }
        else if (position < wordCount - 1) word += ' '; return word;
    }, textDecoration: function(el, style) {
        if (!style) style = this.getStyle(el); var types = { underline: null, overline: null, 'line-through': null }; for (var search = el; search.parentNode && search.parentNode.nodeType == 1; ) {
            var foundAll = true; for (var type in types) { if (!hasOwnProperty(types, type) || types[type]) continue; if (style.get('textDecoration').indexOf(type) != -1) types[type] = style.get('color'); foundAll = false; }
            if (foundAll) break; style = this.getStyle(search = search.parentNode);
        }
        return types;
    }, textShadow: cached(function(value) {
        if (value == 'none') return null; var shadows = [], currentShadow = {}, result, offCount = 0; var re = /(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)|(-?[\d.]+[a-z%]*)|,/ig; while (result = re.exec(value)) {
            if (result[0] == ',') { shadows.push(currentShadow); currentShadow = {}; offCount = 0; }
            else if (result[1]) { currentShadow.color = result[1]; }
            else { currentShadow[['offX', 'offY', 'blur'][offCount++]] = result[2]; } 
        }
        shadows.push(currentShadow); return shadows;
    }), textTransform: (function() { var map = { uppercase: function(s) { return s.toUpperCase(); }, lowercase: function(s) { return s.toLowerCase(); }, capitalize: function(s) { return s.replace(/\b./g, function($0) { return $0.toUpperCase(); }); } }; return function(text, style) { var transform = map[style.get('textTransform')]; return transform ? transform(text) : text; }; })(), whiteSpace: (function() { var ignore = { inline: 1, 'inline-block': 1, 'run-in': 1 }; return function(text, style, node) { if (ignore[style.get('display')]) return text; if (!node.previousSibling) text = text.replace(/^\s+/, ''); if (!node.nextSibling) text = text.replace(/\s+$/, ''); return text; }; })()
    }; CSS.ready = (function() {
        var complete = !CSS.recognizesMedia('all'), hasLayout = false; var queue = [], perform = function() { complete = true; for (var fn; fn = queue.shift(); fn()); }; var links = elementsByTagName('link'), styles = elementsByTagName('style'); function isContainerReady(el) { return el.disabled || isSheetReady(el.sheet, el.media || 'screen'); }
        function isSheetReady(sheet, media) {
            if (!CSS.recognizesMedia(media || 'all')) return true; if (!sheet || sheet.disabled) return false; try { var rules = sheet.cssRules, rule; if (rules) { search: for (var i = 0, l = rules.length; rule = rules[i], i < l; ++i) { switch (rule.type) { case 2: break; case 3: if (!isSheetReady(rule.styleSheet, rule.media.mediaText)) return false; break; default: break search; } } } }
            catch (e) { }
            return true;
        }
        function allStylesLoaded() {
            if (document.createStyleSheet) return true; var el, i; for (i = 0; el = links[i]; ++i) { if (el.rel.toLowerCase() == 'stylesheet' && !isContainerReady(el)) return false; }
            for (i = 0; el = styles[i]; ++i) { if (!isContainerReady(el)) return false; }
            return true;
        }
        DOM.ready(function() { if (!hasLayout) hasLayout = CSS.getStyle(document.body).isUsable(); if (complete || (hasLayout && allStylesLoaded())) perform(); else setTimeout(arguments.callee, 10); }); return function(listener) { if (complete) listener(); else queue.push(listener); };
    })(); function Font(data) { var face = this.face = data.face; this.glyphs = data.glyphs; this.w = data.w; this.baseSize = parseInt(face['units-per-em'], 10); this.family = face['font-family'].toLowerCase(); this.weight = face['font-weight']; this.style = face['font-style'] || 'normal'; this.viewBox = (function() { var parts = face.bbox.split(/\s+/); var box = { minX: parseInt(parts[0], 10), minY: parseInt(parts[1], 10), maxX: parseInt(parts[2], 10), maxY: parseInt(parts[3], 10) }; box.width = box.maxX - box.minX; box.height = box.maxY - box.minY; box.toString = function() { return [this.minX, this.minY, this.width, this.height].join(' '); }; return box; })(); this.ascent = -parseInt(face.ascent, 10); this.descent = -parseInt(face.descent, 10); this.height = -this.ascent + this.descent; }
    function FontFamily() {
        var styles = {}, mapping = { oblique: 'italic', italic: 'oblique' }; this.add = function(font) { (styles[font.style] || (styles[font.style] = {}))[font.weight] = font; }; this.get = function(style, weight) {
            var weights = styles[style] || styles[mapping[style]] || styles.normal || styles.italic || styles.oblique; if (!weights) return null; weight = { normal: 400, bold: 700}[weight] || parseInt(weight, 10); if (weights[weight]) return weights[weight]; var up = { 1: 1, 99: 0}[weight % 100], alts = [], min, max; if (up === undefined) up = weight > 400; if (weight == 500) weight = 400; for (var alt in weights) { if (!hasOwnProperty(weights, alt)) continue; alt = parseInt(alt, 10); if (!min || alt < min) min = alt; if (!max || alt > max) max = alt; alts.push(alt); }
            if (weight < min) weight = min; if (weight > max) weight = max; alts.sort(function(a, b) { return (up ? (a > weight && b > weight) ? a < b : a > b : (a < weight && b < weight) ? a > b : a < b) ? -1 : 1; }); return weights[alts[0]];
        };
    }
    function HoverHandler() {
        function contains(node, anotherNode) { if (node.contains) return node.contains(anotherNode); return node.compareDocumentPosition(anotherNode) & 16; }
        function onOverOut(e) { var related = e.relatedTarget; if (!related || contains(this, related)) return; trigger(this); }
        function onEnterLeave(e) { trigger(this); }
        function trigger(el) { setTimeout(function() { api.replace(el, sharedStorage.get(el).options, true); }, 10); }
        this.attach = function(el) {
            if (el.onmouseenter === undefined) { addEvent(el, 'mouseover', onOverOut); addEvent(el, 'mouseout', onOverOut); }
            else { addEvent(el, 'mouseenter', onEnterLeave); addEvent(el, 'mouseleave', onEnterLeave); } 
        };
    }
    function ReplaceHistory() {
        var list = [], map = {}; function filter(keys) { var values = [], key; for (var i = 0; key = keys[i]; ++i) values[i] = list[map[key]]; return values; }
        this.add = function(key, args) { map[key] = list.push(args) - 1; }; this.repeat = function() { var snapshot = arguments.length ? filter(arguments) : list, args; for (var i = 0; args = snapshot[i++]; ) api.replace(args[0], args[1], true); };
    }
    function Storage() {
        var map = {}, at = 0; function identify(el) { return el.cufid || (el.cufid = ++at); }
        this.get = function(el) { var id = identify(el); return map[id] || (map[id] = {}); };
    }
    function Style(style) {
        var custom = {}, sizes = {}; this.extend = function(styles) {
            for (var property in styles) { if (hasOwnProperty(styles, property)) custom[property] = styles[property]; }
            return this;
        }; this.get = function(property) { return custom[property] != undefined ? custom[property] : style[property]; }; this.getSize = function(property, base) { return sizes[property] || (sizes[property] = new CSS.Size(this.get(property), base)); }; this.isUsable = function() { return !!style; };
    }
    function addEvent(el, type, listener) {
        if (el.addEventListener) { el.addEventListener(type, listener, false); }
        else if (el.attachEvent) { el.attachEvent('on' + type, function() { return listener.call(el, window.event); }); } 
    }
    function attach(el, options) {
        var storage = sharedStorage.get(el); if (storage.options) return el; if (options.hover && options.hoverables[el.nodeName.toLowerCase()]) { hoverHandler.attach(el); }
        storage.options = options; return el;
    }
    function cached(fun) { var cache = {}; return function(key) { if (!hasOwnProperty(cache, key)) cache[key] = fun.apply(null, arguments); return cache[key]; }; }
    function getFont(el, style) {
        var families = CSS.quotedList(style.get('fontFamily').toLowerCase()), family; for (var i = 0; family = families[i]; ++i) { if (fonts[family]) return fonts[family].get(style.get('fontStyle'), style.get('fontWeight')); }
        return null;
    }
    function elementsByTagName(query) { return document.getElementsByTagName(query); }
    function hasOwnProperty(obj, property) { return obj.hasOwnProperty(property); }
    function merge() {
        var merged = {}, args, key; for (var i = 0, l = arguments.length; args = arguments[i], i < l; ++i) { for (key in args) { if (hasOwnProperty(args, key)) merged[key] = args[key]; } }
        return merged;
    }
    function process(font, text, style, options, node, el) {
        var fragment = document.createDocumentFragment(), processed; if (text === '') return fragment; var separate = options.separate; var parts = text.split(separators[separate]), needsAligning = (separate == 'words'); if (needsAligning && HAS_BROKEN_REGEXP) { if (/^\s/.test(text)) parts.unshift(''); if (/\s$/.test(text)) parts.push(''); }
        for (var i = 0, l = parts.length; i < l; ++i) { processed = engines[options.engine](font, needsAligning ? CSS.textAlign(parts[i], style, i, l) : parts[i], style, options, node, el, i < l - 1); if (processed) fragment.appendChild(processed); }
        return fragment;
    }
    function replaceElement(el, options) {
        var style = CSS.getStyle(attach(el, options)).extend(options); var font = getFont(el, style), node, type, next, anchor, text; if (!font) return; for (node = el.firstChild; node; node = next) {
            type = node.nodeType; next = node.nextSibling; if (type == 3) {
                if (anchor) { anchor.appendData(node.data); el.removeChild(node); }
                else anchor = node; if (next) continue;
            }
            if (anchor) { el.replaceChild(process(font, CSS.whiteSpace(anchor.data, style, anchor), style, options, node, el), anchor); anchor = null; }
            if (type == 1 && node.firstChild) {
                if (CSS.hasClass(node, 'cufon')) { engines[options.engine](font, null, style, options, node, el); }
                else arguments.callee(node, options);
            } 
        } 
    }
    var HAS_BROKEN_REGEXP = ' '.split(/\s+/).length == 0; var sharedStorage = new Storage(); var hoverHandler = new HoverHandler(); var replaceHistory = new ReplaceHistory(); var initialized = false; var engines = {}, fonts = {}, defaultOptions = { autoDetect: false, enableTextDecoration: false, engine: null, forceHitArea: false, hover: false, hoverables: { a: true }, printable: true, selector: (window.Sizzle || (window.jQuery && function(query) { return jQuery(query); }) || (window.dojo && dojo.query) || (window.Ext && Ext.query) || (window.YAHOO && YAHOO.util && YAHOO.util.Selector && YAHOO.util.Selector.query) || (window.$$ && function(query) { return $$(query); }) || (window.$ && function(query) { return $(query); }) || (document.querySelectorAll && function(query) { return document.querySelectorAll(query); }) || elementsByTagName), separate: 'words', textShadow: 'none' }; var separators = { words: /[^\S\u00a0]+/, characters: '', none: /^/ }; api.now = function() { DOM.ready(); return api; }; api.refresh = function() { replaceHistory.repeat.apply(replaceHistory, arguments); return api; }; api.registerEngine = function(id, engine) { if (!engine) return api; engines[id] = engine; return api.set('engine', id); }; api.registerFont = function(data) { if (!data) return api; var font = new Font(data), family = font.family; if (!fonts[family]) fonts[family] = new FontFamily(); fonts[family].add(font); return api.set('fontFamily', '"' + family + '"'); }; api.replace = function(elements, options, ignoreHistory) {
        options = merge(defaultOptions, options); if (!options.engine) return api; if (!initialized) { CSS.addClass(DOM.root(), 'cufon-active cufon-loading'); CSS.ready(function() { CSS.addClass(CSS.removeClass(DOM.root(), 'cufon-loading'), 'cufon-ready'); }); initialized = true; }
        if (options.hover) options.forceHitArea = true; if (options.autoDetect) delete options.fontFamily; if (typeof options.textShadow == 'string')
            options.textShadow = CSS.textShadow(options.textShadow); if (typeof options.color == 'string' && /^-/.test(options.color))
            options.textGradient = CSS.gradient(options.color); if (!ignoreHistory) replaceHistory.add(elements, arguments); if (elements.nodeType || typeof elements == 'string') elements = [elements]; CSS.ready(function() { for (var i = 0, l = elements.length; i < l; ++i) { var el = elements[i]; if (typeof el == 'string') api.replace(options.selector(el), options, true); else replaceElement(el, options); } }); return api;
    }; api.set = function(option, value) { defaultOptions[option] = value; return api; }; return api;
})(); Cufon.registerEngine('canvas', (function() {
    var check = document.createElement('canvas'); if (!check || !check.getContext || !check.getContext.apply) return; check = null; var HAS_INLINE_BLOCK = Cufon.CSS.supports('display', 'inline-block'); var HAS_BROKEN_LINEHEIGHT = !HAS_INLINE_BLOCK && (document.compatMode == 'BackCompat' || /frameset|transitional/i.test(document.doctype.publicId)); var styleSheet = document.createElement('style'); styleSheet.type = 'text/css'; styleSheet.appendChild(document.createTextNode(('.cufon-canvas{text-indent:0;}' + '@media screen,projection{' + '.cufon-canvas{display:inline;display:inline-block;position:relative;vertical-align:middle;' +
(HAS_BROKEN_LINEHEIGHT ? '' : 'font-size:1px;line-height:1px;') + '}.cufon-canvas .cufon-alt{display:-moz-inline-box;display:inline-block;width:0;height:0;overflow:hidden;text-indent:-10000in;}' +
(HAS_INLINE_BLOCK ? '.cufon-canvas canvas{position:relative;}' : '.cufon-canvas canvas{position:absolute;}') + '}' + '@media print{' + '.cufon-canvas{padding:0;}' + '.cufon-canvas canvas{display:none;}' + '.cufon-canvas .cufon-alt{display:inline;}' + '}').replace(/;/g, '!important;'))); document.getElementsByTagName('head')[0].appendChild(styleSheet); function generateFromVML(path, context) {
    var atX = 0, atY = 0; var code = [], re = /([mrvxe])([^a-z]*)/g, match; generate: for (var i = 0; match = re.exec(path); ++i) {
        var c = match[2].split(','); switch (match[1]) { case 'v': code[i] = { m: 'bezierCurveTo', a: [atX + ~ ~c[0], atY + ~ ~c[1], atX + ~ ~c[2], atY + ~ ~c[3], atX += ~ ~c[4], atY += ~ ~c[5]] }; break; case 'r': code[i] = { m: 'lineTo', a: [atX += ~ ~c[0], atY += ~ ~c[1]] }; break; case 'm': code[i] = { m: 'moveTo', a: [atX = ~ ~c[0], atY = ~ ~c[1]] }; break; case 'x': code[i] = { m: 'closePath' }; break; case 'e': break generate; }
        context[code[i].m].apply(context, code[i].a);
    }
    return code;
}
    function interpret(code, context) { for (var i = 0, l = code.length; i < l; ++i) { var line = code[i]; context[line.m].apply(context, line.a); } }
    return function(font, text, style, options, node, el) {
        var redraw = (text === null); if (redraw) text = node.alt; var viewBox = font.viewBox; var size = style.getSize('fontSize', font.baseSize); var letterSpacing = style.get('letterSpacing'); letterSpacing = (letterSpacing == 'normal') ? 0 : size.convertFrom(parseInt(letterSpacing, 10)); var expandTop = 0, expandRight = 0, expandBottom = 0, expandLeft = 0; var shadows = options.textShadow, shadowOffsets = []; if (shadows) { for (var i = shadows.length; i--; ) { var shadow = shadows[i]; var x = size.convertFrom(parseFloat(shadow.offX)); var y = size.convertFrom(parseFloat(shadow.offY)); shadowOffsets[i] = [x, y]; if (y < expandTop) expandTop = y; if (x > expandRight) expandRight = x; if (y > expandBottom) expandBottom = y; if (x < expandLeft) expandLeft = x; } }
        var chars = Cufon.CSS.textTransform(text, style).split(''), chr; var glyphs = font.glyphs, glyph, kerning, k; var width = 0, advance, jumps = []; for (var i = 0, j = 0, l = chars.length; i < l; ++i) {
            glyph = glyphs[chr = chars[i]] || font.missingGlyph; if (!glyph) continue; if (kerning) { width -= k = kerning[chr] || 0; jumps[j - 1] -= k; }
            width += advance = jumps[j++] = ~ ~(glyph.w || font.w) + letterSpacing; kerning = glyph.k;
        }
        if (advance === undefined) return null; expandRight += viewBox.width - advance; expandLeft += viewBox.minX; var wrapper, canvas; if (redraw) { wrapper = node; canvas = node.firstChild; }
        else { wrapper = document.createElement('span'); wrapper.className = 'cufon cufon-canvas'; wrapper.alt = text; canvas = document.createElement('canvas'); wrapper.appendChild(canvas); if (options.printable) { var print = document.createElement('span'); print.className = 'cufon-alt'; print.appendChild(document.createTextNode(text)); wrapper.appendChild(print); } }
        var wStyle = wrapper.style; var cStyle = canvas.style; var height = size.convert(viewBox.height); var roundedHeight = Math.ceil(height); var roundingFactor = roundedHeight / height; var stretchFactor = roundingFactor * Cufon.CSS.fontStretch(style.get('fontStretch')); var stretchedWidth = width * stretchFactor; var canvasWidth = Math.ceil(size.convert(stretchedWidth + expandRight - expandLeft)); var canvasHeight = Math.ceil(size.convert(viewBox.height - expandTop + expandBottom)); canvas.width = canvasWidth; canvas.height = canvasHeight; cStyle.width = canvasWidth + 'px'; cStyle.height = canvasHeight + 'px'; expandTop += viewBox.minY; cStyle.top = Math.round(size.convert(expandTop - font.ascent)) + 'px'; cStyle.left = Math.round(size.convert(expandLeft)) + 'px'; var wrapperWidth = Math.ceil(size.convert(stretchedWidth)) + 'px'; if (HAS_INLINE_BLOCK) { wStyle.width = wrapperWidth; wStyle.height = size.convert(font.height) + 'px'; }
        else { wStyle.paddingLeft = wrapperWidth; wStyle.paddingBottom = (size.convert(font.height) - 1) + 'px'; }
        var g = canvas.getContext('2d'), scale = height / viewBox.height; g.scale(scale, scale * roundingFactor); g.translate(-expandLeft, -expandTop); g.lineWidth = font.face['underline-thickness']; g.save(); function line(y, color) { g.strokeStyle = color; g.beginPath(); g.moveTo(0, y); g.lineTo(width, y); g.stroke(); }
        var textDecoration = options.enableTextDecoration ? Cufon.CSS.textDecoration(el, style) : {}; if (textDecoration.underline) line(-font.face['underline-position'], textDecoration.underline); if (textDecoration.overline) line(font.ascent, textDecoration.overline); function renderText() {
            g.scale(stretchFactor, 1); for (var i = 0, j = 0, l = chars.length; i < l; ++i) {
                var glyph = glyphs[chars[i]] || font.missingGlyph; if (!glyph) continue; if (glyph.d) { g.beginPath(); if (glyph.code) interpret(glyph.code, g); else glyph.code = generateFromVML('m' + glyph.d, g); g.fill(); }
                g.translate(jumps[j++], 0);
            }
            g.restore();
        }
        if (shadows) { for (var i = shadows.length; i--; ) { var shadow = shadows[i]; g.save(); g.fillStyle = shadow.color; g.translate.apply(g, shadowOffsets[i]); renderText(); } }
        var gradient = options.textGradient; if (gradient) {
            var stops = gradient.stops, fill = g.createLinearGradient(0, viewBox.minY, 0, viewBox.maxY); for (var i = 0, l = stops.length; i < l; ++i) { fill.addColorStop.apply(fill, stops[i]); }
            g.fillStyle = fill;
        }
        else g.fillStyle = style.get('color'); renderText(); if (textDecoration['line-through']) line(-font.descent, textDecoration['line-through']); return wrapper;
    };
})()); Cufon.registerEngine('vml', (function() {
    var ns = document.namespaces; if (!ns) return; ns.add('cvml', 'urn:schemas-microsoft-com:vml'); ns = null; var check = document.createElement('cvml:shape'); check.style.behavior = 'url(#default#VML)'; if (!check.coordsize) return; check = null; var HAS_BROKEN_LINEHEIGHT = (document.documentMode || 0) < 8; document.write(('<style type="text/css">' + '.cufon-vml-canvas{text-indent:0;}' + '@media screen{' + 'cvml\\:shape,cvml\\:rect,cvml\\:fill,cvml\\:shadow{behavior:url(#default#VML);display:block;antialias:true;position:absolute;}' + '.cufon-vml-canvas{position:absolute;text-align:left;}' + '.cufon-vml{display:inline-block;position:relative;vertical-align:' +
(HAS_BROKEN_LINEHEIGHT ? 'middle' : 'text-bottom') + ';}' + '.cufon-vml .cufon-alt{position:absolute;left:-10000in;font-size:1px;}' + 'a .cufon-vml{cursor:pointer}' + '}' + '@media print{' + '.cufon-vml *{display:none;}' + '.cufon-vml .cufon-alt{display:inline;}' + '}' + '</style>').replace(/;/g, '!important;')); function getFontSizeInPixels(el, value) { return getSizeInPixels(el, /(?:em|ex|%)$|^[a-z-]+$/i.test(value) ? '1em' : value); }
    function getSizeInPixels(el, value) { if (/px$/i.test(value)) return parseFloat(value); var style = el.style.left, runtimeStyle = el.runtimeStyle.left; el.runtimeStyle.left = el.currentStyle.left; el.style.left = value.replace('%', 'em'); var result = el.style.pixelLeft; el.style.left = style; el.runtimeStyle.left = runtimeStyle; return result; }
    var fills = {}; function gradientFill(gradient) {
        var id = gradient.id; if (!fills[id]) {
            var stops = gradient.stops, fill = document.createElement('cvml:fill'), colors = []; fill.type = 'gradient'; fill.angle = 180; fill.focus = '0'; fill.method = 'sigma'; fill.color = stops[0][1]; for (var j = 1, k = stops.length - 1; j < k; ++j) { colors.push(stops[j][0] * 100 + '% ' + stops[j][1]); }
            fill.colors = colors.join(','); fill.color2 = stops[k][1]; fills[id] = fill;
        }
        return fills[id];
    }
    return function(font, text, style, options, node, el, hasNext) {
        var redraw = (text === null); if (redraw) text = node.alt; var viewBox = font.viewBox; var size = style.computedFontSize || (style.computedFontSize = new Cufon.CSS.Size(getFontSizeInPixels(el, style.get('fontSize')) + 'px', font.baseSize)); var letterSpacing = style.computedLSpacing; if (letterSpacing == undefined) { letterSpacing = style.get('letterSpacing'); style.computedLSpacing = letterSpacing = (letterSpacing == 'normal') ? 0 : ~ ~size.convertFrom(getSizeInPixels(el, letterSpacing)); }
        var wrapper, canvas; if (redraw) { wrapper = node; canvas = node.firstChild; }
        else {
            wrapper = document.createElement('span'); wrapper.className = 'cufon cufon-vml'; wrapper.alt = text; canvas = document.createElement('span'); canvas.className = 'cufon-vml-canvas'; wrapper.appendChild(canvas); if (options.printable) { var print = document.createElement('span'); print.className = 'cufon-alt'; print.appendChild(document.createTextNode(text)); wrapper.appendChild(print); }
            if (!hasNext) wrapper.appendChild(document.createElement('cvml:shape'));
        }
        var wStyle = wrapper.style; var cStyle = canvas.style; var height = size.convert(viewBox.height), roundedHeight = Math.ceil(height); var roundingFactor = roundedHeight / height; var stretchFactor = roundingFactor * Cufon.CSS.fontStretch(style.get('fontStretch')); var minX = viewBox.minX, minY = viewBox.minY; cStyle.height = roundedHeight; cStyle.top = Math.round(size.convert(minY - font.ascent)); cStyle.left = Math.round(size.convert(minX)); wStyle.height = size.convert(font.height) + 'px'; var textDecoration = options.enableTextDecoration ? Cufon.CSS.textDecoration(el, style) : {}; var color = style.get('color'); var chars = Cufon.CSS.textTransform(text, style).split(''), chr; var glyphs = font.glyphs, glyph, kerning, k; var width = 0, jumps = [], offsetX = 0, advance; var shape, shadows = options.textShadow; for (var i = 0, j = 0, l = chars.length; i < l; ++i) {
            glyph = glyphs[chr = chars[i]] || font.missingGlyph; if (!glyph) continue; if (kerning) { width -= k = kerning[chr] || 0; jumps[j - 1] -= k; }
            width += advance = jumps[j++] = ~ ~(glyph.w || font.w) + letterSpacing; kerning = glyph.k;
        }
        if (advance === undefined) return null; var fullWidth = -minX + width + (viewBox.width - advance); var shapeWidth = size.convert(fullWidth * stretchFactor), roundedShapeWidth = Math.round(shapeWidth); var coordSize = fullWidth + ',' + viewBox.height, coordOrigin; var stretch = 'r' + coordSize + 'ns'; var fill = options.textGradient && gradientFill(options.textGradient); for (i = 0, j = 0; i < l; ++i) {
            glyph = glyphs[chars[i]] || font.missingGlyph; if (!glyph) continue; if (redraw) { shape = canvas.childNodes[j]; while (shape.firstChild) shape.removeChild(shape.firstChild); }
            else { shape = document.createElement('cvml:shape'); canvas.appendChild(shape); }
            shape.stroked = 'f'; shape.coordsize = coordSize; shape.coordorigin = coordOrigin = (minX - offsetX) + ',' + minY; shape.path = (glyph.d ? 'm' + glyph.d + 'xe' : '') + 'm' + coordOrigin + stretch; shape.fillcolor = color; if (fill) shape.appendChild(fill.cloneNode(false)); var sStyle = shape.style; sStyle.width = roundedShapeWidth; sStyle.height = roundedHeight; if (shadows) {
                var shadow1 = shadows[0], shadow2 = shadows[1]; var color1 = Cufon.CSS.color(shadow1.color), color2; var shadow = document.createElement('cvml:shadow'); shadow.on = 't'; shadow.color = color1.color; shadow.offset = shadow1.offX + ',' + shadow1.offY; if (shadow2) { color2 = Cufon.CSS.color(shadow2.color); shadow.type = 'double'; shadow.color2 = color2.color; shadow.offset2 = shadow2.offX + ',' + shadow2.offY; }
                shadow.opacity = color1.opacity || (color2 && color2.opacity) || 1; shape.appendChild(shadow);
            }
            offsetX += jumps[j++];
        }
        var cover = shape.nextSibling, coverFill, vStyle; if (options.forceHitArea) {
            if (!cover) { cover = document.createElement('cvml:rect'); cover.stroked = 'f'; cover.className = 'cufon-vml-cover'; coverFill = document.createElement('cvml:fill'); coverFill.opacity = 0; cover.appendChild(coverFill); canvas.appendChild(cover); }
            vStyle = cover.style; vStyle.width = roundedShapeWidth; vStyle.height = roundedHeight;
        }
        else if (cover) canvas.removeChild(cover); wStyle.width = Math.max(Math.ceil(size.convert(width * stretchFactor)), 0); if (HAS_BROKEN_LINEHEIGHT) {
            var yAdjust = style.computedYAdjust; if (yAdjust === undefined) { var lineHeight = style.get('lineHeight'); if (lineHeight == 'normal') lineHeight = '1em'; else if (!isNaN(lineHeight)) lineHeight += 'em'; style.computedYAdjust = yAdjust = 0.5 * (getSizeInPixels(el, lineHeight) - parseFloat(wStyle.height)); }
            if (yAdjust) { wStyle.marginTop = Math.ceil(yAdjust) + 'px'; wStyle.marginBottom = yAdjust + 'px'; } 
        }
        return wrapper;
    };
})());
Cufon.registerFont({ "w": 225, "face": { "font-family": "clarendon", "font-weight": 400, "font-stretch": "normal", "units-per-em": "360", "panose-1": "2 0 5 3 0 0 0 0 0 0", "ascent": "288", "descent": "-72", "x-height": "6", "bbox": "-24 -275 350 85", "underline-thickness": "30.24", "underline-position": "-38.52", "stemh": "26", "stemv": "43", "unicode-range": "U+0020-U+007E" }, "glyphs": { " ": { "w": 112 }, "A": { "d": "-5,0r0,-27v24,1,34,-4,40,-24r67,-191r51,0r72,191v7,21,12,25,36,24r0,27r-125,0r0,-27v21,1,52,2,36,-22r-10,-28r-80,0v-1,18,-31,52,7,50r18,0r0,27r-112,0xm152,-105r-31,-84r-28,84r59,0", "w": 259 }, "B": { "d": "8,0r0,-27v23,0,38,3,38,-23r0,-142v4,-26,-15,-21,-38,-22r0,-28v85,5,229,-24,229,61v0,28,-16,45,-49,53v39,8,59,28,59,62v0,91,-149,61,-239,66xm97,-27v47,1,102,4,97,-42v5,-45,-49,-43,-97,-42r0,84xm97,-139v43,1,94,3,89,-37v4,-42,-46,-39,-89,-38r0,75", "w": 262 }, "C": { "d": "13,-121v0,-96,112,-169,191,-103r7,-22r26,0r0,99r-27,0v-6,-47,-32,-72,-69,-72v-43,0,-71,36,-71,100v0,60,26,93,71,93v35,0,58,-24,65,-68r31,0v-5,65,-41,101,-100,101v-73,0,-124,-58,-124,-128", "w": 254 }, "D": { "d": "217,-121v0,-80,-40,-99,-120,-93r0,187v79,6,120,-13,120,-94xm8,0r0,-27v23,0,38,3,38,-23r0,-142v4,-26,-15,-21,-38,-22r0,-28r137,0v84,0,129,42,129,121v0,79,-45,121,-129,121r-137,0", "w": 291 }, "E": { "d": "8,0r0,-27v23,0,38,3,38,-23r0,-142v4,-26,-15,-21,-38,-22r0,-28r238,0r0,97r-27,0v7,-83,-53,-68,-122,-69r0,74v37,1,52,0,52,-44r27,0r0,121r-27,0v-1,-48,-13,-50,-52,-49r0,85v73,0,125,13,122,-75r27,0r0,102r-238,0", "w": 271 }, "F": { "d": "205,-141v-1,-51,-8,-75,-63,-73r-45,0r0,74v34,1,43,-4,44,-44r28,0r0,121r-28,0v-2,-44,-10,-50,-44,-49v6,38,-22,98,41,85r0,27r-130,0r0,-27v23,0,38,3,38,-23r0,-142v4,-26,-15,-21,-38,-22r0,-28r225,0r0,101r-28,0", "w": 249 }, "G": { "d": "13,-121v0,-98,116,-169,191,-101r11,-21r25,0r0,94r-28,0v-10,-45,-37,-70,-72,-70v-42,0,-70,36,-70,98v0,62,28,96,73,96v39,-1,57,-19,53,-57v4,-25,-19,-19,-42,-20r0,-27r128,0r0,27v-22,0,-36,-4,-36,23r0,80r-26,0r-13,-20v-78,66,-194,-1,-194,-102", "w": 284 }, "H": { "d": "8,0r0,-27v23,0,38,3,38,-23r0,-142v4,-26,-15,-21,-38,-22r0,-28r130,0r0,28v-23,1,-41,-6,-41,22r0,53r104,0v-5,-29,16,-81,-24,-75r-16,0r0,-28r129,0r0,28v-22,0,-38,-4,-38,22r0,142v-4,26,15,23,38,23r0,27r-129,0r0,-27v23,0,40,4,40,-23r0,-59r-104,0v5,37,-21,95,41,82r0,27r-130,0", "w": 298 }, "I": { "d": "9,0r0,-27v23,0,39,4,39,-23r0,-142v4,-27,-16,-21,-39,-22r0,-28r130,0r0,28v-22,1,-39,-5,-39,22r0,142v-4,27,16,23,39,23r0,27r-130,0", "w": 148 }, "J": { "d": "165,-77v4,54,-26,85,-80,84v-46,0,-76,-26,-76,-60v0,-23,12,-36,33,-36v35,-2,39,54,5,58v30,21,66,11,66,-39r0,-122v5,-27,-17,-21,-40,-22r0,-28r127,0r0,28v-22,0,-35,-3,-35,22r0,115", "w": 208 }, "K": { "d": "96,-83v2,30,-11,65,33,56r0,27r-121,0r0,-27v23,0,38,3,38,-23r0,-142v4,-26,-15,-21,-38,-22r0,-28r123,0r0,28v-22,0,-35,-3,-35,22r0,68v28,-29,63,-53,87,-86v1,-6,-22,-4,-30,-4r0,-28r122,0r0,28v-46,-5,-75,41,-105,64r73,104v14,20,22,19,47,19r0,27r-134,0r0,-27v18,1,44,3,29,-19r-50,-71", "w": 279 }, "L": { "d": "142,-27v56,3,63,-25,63,-77r28,0r0,104r-225,0r0,-27v23,0,38,3,38,-23r0,-142v4,-26,-15,-21,-38,-22r0,-28r130,0r0,28v-23,1,-41,-6,-41,22r0,165r45,0", "w": 249 }, "M": { "d": "218,0r0,-27v23,0,40,4,40,-23r0,-156r-78,206r-24,0r-73,-210r0,160v-4,26,15,23,38,23r0,27r-113,0r0,-27v23,0,37,3,37,-23r0,-142v3,-26,-14,-22,-37,-22r0,-28r113,0r54,157r59,-157r108,0r0,28v-22,0,-38,-4,-38,22r0,142v-4,26,15,23,38,23r0,27r-124,0", "w": 350 }, "N": { "d": "254,0r-51,0r-120,-197r0,147v-4,27,17,23,40,23r0,27r-119,0r0,-27v23,0,41,5,41,-23r0,-142v4,-27,-16,-21,-39,-22r0,-28r103,0r107,176r0,-126v4,-27,-18,-21,-41,-22r0,-28r114,0r0,28v-22,0,-35,-3,-35,22r0,192", "w": 295 }, "O": { "d": "13,-121v0,-76,53,-127,133,-127v80,0,133,51,133,127v0,76,-53,128,-133,128v-80,0,-133,-52,-133,-128xm70,-121v0,63,29,99,76,99v47,0,76,-36,76,-99v0,-63,-29,-99,-76,-99v-47,0,-76,36,-76,99", "w": 291 }, "P": { "d": "234,-175v0,65,-62,69,-137,66v5,37,-21,95,41,82r0,27r-130,0r0,-27v23,0,38,3,38,-23r0,-142v4,-26,-15,-21,-38,-22r0,-28v89,2,226,-18,226,67xm97,-136v44,1,89,-1,84,-39v3,-40,-39,-40,-84,-39r0,78", "w": 246 }, "Q": { "d": "240,-29v17,23,39,22,38,-18r23,0v6,76,-62,93,-100,44v-95,34,-188,-23,-188,-118v0,-76,53,-127,133,-127v123,0,174,148,94,219xm180,-31v-12,-23,-26,-35,-42,-35v-13,0,-22,9,-22,22v-1,29,48,29,64,13xm213,-62v8,-15,12,-34,12,-56v0,-65,-29,-102,-77,-102v-49,0,-79,36,-79,99v0,37,9,64,27,77v-4,-74,82,-64,117,-18", "w": 300 }, "R": { "d": "97,-50v-4,27,17,23,41,23r0,27r-130,0r0,-27v23,0,38,3,38,-23r0,-142v4,-26,-15,-21,-38,-22r0,-28v85,6,234,-25,234,58v0,35,-23,57,-69,62v45,5,48,30,49,73v1,14,3,21,11,21v11,0,11,-12,11,-41r23,0v5,45,-10,76,-49,76v-41,0,-50,-31,-48,-73v2,-46,-26,-49,-73,-48r0,64xm97,-141v42,1,97,4,92,-37v5,-42,-50,-36,-92,-36r0,73", "w": 278 }, "S": { "d": "16,0r0,-100r28,0v8,48,37,74,81,74v32,0,50,-11,50,-31v0,-32,-51,-38,-81,-45v-54,-13,-79,-33,-79,-72v0,-74,106,-98,157,-50r13,-18r22,0r0,92r-28,0v-8,-45,-36,-69,-75,-69v-30,0,-46,12,-46,31v-1,33,55,34,84,42v51,13,77,36,77,75v2,79,-114,102,-170,48r-8,23r-25,0", "w": 231 }, "T": { "d": "96,-215v-43,-1,-60,21,-60,74r-28,0r0,-101r228,0r0,101r-28,0v0,-52,-17,-76,-61,-74r0,165v-5,29,21,22,45,23r0,27r-140,0r0,-27v23,-1,44,7,44,-23r0,-165", "w": 244 }, "U": { "d": "43,-192v3,-25,-13,-22,-35,-22r0,-28r125,0r0,28v-22,1,-43,-5,-39,22v9,64,-29,164,49,164v76,0,42,-99,50,-164v3,-26,-15,-21,-37,-22r0,-28r111,0r0,28v-22,0,-34,-3,-34,22r0,116v0,54,-34,83,-96,83v-62,0,-94,-28,-94,-83r0,-116", "w": 275 }, "V": { "d": "102,0r-68,-191v-7,-20,-15,-24,-38,-23r0,-28r126,0r0,28v-14,1,-41,-3,-38,10v12,50,33,96,49,144r52,-144v3,-13,-24,-9,-39,-10r0,-28r115,0r0,28v-23,-1,-31,5,-38,24r-71,190r-50,0", "w": 256 }, "W": { "d": "88,0r-51,-182v-7,-24,-11,-33,-34,-32r0,-28r103,0r0,28v-16,-1,-30,0,-25,19r38,136r43,-125v-5,-25,-12,-32,-36,-30r0,-28r105,0r0,28v-18,-1,-34,0,-28,20r41,131r36,-122v11,-24,-2,-31,-29,-29r0,-28r99,0r0,28v-20,-1,-26,4,-32,24r-55,190r-48,0r-38,-129r-43,129r-46,0", "w": 352 }, "X": { "d": "138,-95v-13,17,-39,39,-46,59v-1,13,21,8,34,9r0,27r-126,0r0,-27v24,1,31,-2,45,-18r69,-78r-56,-72v-12,-16,-24,-20,-48,-19r0,-28r128,0r0,28v-16,-2,-37,1,-22,18r32,39v14,-17,33,-31,44,-51v1,-7,-20,-6,-30,-6r0,-28r114,0r0,28v-28,-2,-31,6,-51,26r-54,59r62,76v18,23,24,27,54,26r0,27r-139,0r0,-27v18,1,44,0,29,-18", "w": 284 }, "Y": { "d": "157,-101v5,29,-16,80,24,74r21,0r0,27r-140,0r0,-27v24,-1,45,6,45,-23r0,-51r-60,-88v-14,-21,-21,-27,-47,-25r0,-28r128,0r0,28v-19,-1,-44,-2,-29,19r41,57v15,-24,36,-43,48,-70v-1,-9,-23,-5,-34,-6r0,-28r112,0r0,28v-20,-1,-27,2,-37,16", "w": 263 }, "Z": { "d": "115,-27v67,1,72,-23,77,-82r27,0r0,109r-204,0r0,-29r144,-185r-41,0v-53,-4,-68,23,-68,74r-27,0r0,-102r196,0r0,31r-143,184r39,0", "w": 237 }, "a": { "d": "88,-176v49,-1,74,16,74,64r0,76v0,9,3,12,8,12v10,0,11,-11,11,-39r22,0v1,44,-10,69,-44,69v-21,0,-34,-9,-39,-27v-24,40,-112,36,-110,-19v-9,-42,67,-55,98,-66v24,-16,12,-51,-25,-51v-14,0,-29,4,-33,11v14,0,22,8,22,20v0,14,-10,23,-25,23v-17,0,-29,-11,-29,-28v0,-26,26,-45,70,-45xm119,-89v-38,18,-61,22,-61,45v0,13,9,20,23,20v30,2,42,-28,38,-65", "w": 204 }, "&": { "d": "262,-83r27,0v7,85,-66,113,-124,70v-57,41,-152,15,-152,-53v0,-35,20,-59,62,-79v-23,-47,-1,-104,52,-104v34,0,53,19,53,47v0,26,-15,47,-46,66v14,23,29,46,46,68v19,-18,27,-36,27,-47v0,-6,-7,-8,-22,-8r-10,0r0,-27r114,0r0,27v-66,1,-40,31,-88,79v28,27,62,13,61,-39xm90,-114v-45,19,-26,88,21,86v9,0,19,-3,30,-9v-22,-26,-38,-51,-51,-77xm117,-164v21,-10,31,-22,31,-36v0,-12,-8,-21,-21,-21v-30,2,-27,37,-10,57", "w": 304 }, "^": { "d": "199,-257r88,99r-18,0r-89,-70r-89,70r-19,0r89,-99r38,0", "w": 360 }, "~": { "d": "31,-109v54,-47,112,-2,171,-2v21,0,43,-9,67,-27r0,33v-51,47,-113,1,-170,1v-21,0,-42,10,-68,28r0,-33", "w": 299 }, "*": { "d": "41,-221v21,0,27,37,46,44v-1,-27,-16,-42,-16,-54v0,-10,7,-18,19,-18v37,11,8,33,3,72v20,-8,24,-44,48,-44v10,0,18,10,18,21v0,28,-44,14,-63,27v16,15,63,0,63,29v-19,52,-46,-14,-66,-23v1,27,17,41,17,53v0,10,-8,18,-20,18v-39,-10,-5,-34,-2,-71v-20,7,-24,41,-49,43v-10,0,-18,-11,-18,-21v2,-27,42,-13,63,-27v-21,-15,-63,0,-63,-27v0,-12,9,-22,20,-22", "w": 180 }, "@": { "d": "159,-32v35,2,62,-73,61,-104v0,-20,-11,-32,-25,-32v-33,0,-59,77,-59,104v0,20,10,32,23,32xm103,-81v0,-43,41,-97,88,-96v21,0,34,10,38,32r9,-30r31,0r-34,126v0,12,6,18,15,18v42,0,71,-57,71,-105v0,-65,-49,-109,-122,-109v-83,0,-149,69,-149,157v0,124,159,163,248,90r7,8v-98,83,-281,31,-281,-104v0,-86,80,-162,173,-162v82,0,134,48,134,121v1,54,-34,114,-86,114v-23,0,-36,-13,-37,-36v-26,54,-105,44,-105,-24", "w": 354 }, "b": { "d": "66,-22r-14,24r-24,0r0,-198v2,-21,-8,-22,-28,-21r0,-25r72,0r0,99v37,-63,131,-33,131,57v0,90,-88,119,-137,64xm154,-85v0,-41,-13,-60,-41,-60v-24,0,-41,21,-41,60v0,39,17,61,41,61v28,0,41,-20,41,-61", "w": 214 }, "\\": { "d": "80,33r-89,-282r27,0r89,282r-27,0", "w": 106 }, "|": { "d": "106,-275r0,360r-31,0r0,-360r31,0", "w": 180 }, "{": { "d": "149,-256v-43,-4,-39,30,-39,70v0,45,-5,65,-46,74v49,8,46,45,46,99v0,34,6,46,39,46v-1,3,1,9,-1,10v-69,4,-69,-34,-69,-96v0,-36,-10,-50,-48,-53r0,-12v54,0,48,-38,48,-88v0,-46,16,-60,70,-60r0,10", "w": 180 }, "}": { "d": "31,-266v70,-4,70,33,70,96v0,37,9,48,48,52r0,12v-53,0,-48,38,-48,88v0,46,-17,61,-70,61r0,-10v43,4,39,-30,39,-70v0,-45,5,-66,46,-75v-49,-8,-46,-44,-46,-98v0,-34,-6,-46,-39,-46r0,-10", "w": 180 }, "[": { "d": "33,63r0,-305r90,0r0,25r-43,0r0,255r43,0r0,25r-90,0", "w": 139 }, "]": { "d": "106,63r-90,0r0,-25r43,0r0,-255r-43,0r0,-25r90,0r0,305", "w": 139 }, "c": { "d": "145,-71r28,0v-3,51,-28,77,-76,77v-54,0,-87,-35,-87,-91v0,-54,39,-91,94,-91v43,0,71,23,71,52v0,37,-55,42,-55,6v0,-11,8,-21,21,-22v-38,-30,-82,-6,-82,55v0,40,15,59,45,59v24,0,37,-15,41,-45", "w": 185 }, ":": { "d": "29,-21v0,-15,12,-26,27,-26v15,0,27,11,27,26v0,15,-12,27,-27,27v-15,0,-27,-12,-27,-27xm29,-135v0,-15,12,-27,27,-27v15,0,27,12,27,27v0,15,-12,26,-27,26v-15,0,-27,-11,-27,-26", "w": 112 }, ",": { "d": "28,52r0,-16v22,-6,34,-20,34,-41v-15,13,-38,3,-37,-17v0,-15,10,-25,27,-25v19,0,34,15,34,38v0,32,-22,55,-58,61", "w": 112 }, "d": { "d": "143,-141v-5,-33,20,-87,-35,-76r0,-25r79,0r0,196v-3,22,10,23,31,22r0,24r-75,0r0,-30v-34,66,-142,34,-131,-56v-10,-90,96,-120,131,-55xm61,-85v0,41,13,61,41,61v24,0,41,-22,41,-61v0,-39,-17,-60,-41,-60v-28,0,-41,19,-41,60", "w": 224 }, "$": { "d": "122,-24v28,-1,43,-11,43,-30v0,-18,-13,-26,-43,-31r0,61xm97,-196v-23,3,-35,13,-35,30v0,16,11,25,35,29r0,-59xm97,38r0,-38v-51,-3,-79,-25,-79,-57v0,-17,11,-28,28,-28v14,0,25,9,25,22v0,14,-9,23,-25,22v12,12,29,18,51,18r0,-67v-102,-12,-97,-120,0,-129r0,-28r25,0r0,28v46,2,73,27,73,51v0,16,-11,27,-26,27v-32,1,-34,-41,-2,-41v-11,-10,-26,-15,-45,-15r0,65v57,10,83,30,83,66v0,38,-29,62,-83,66r0,38r-25,0" }, "e": { "d": "149,-61r30,0v-5,42,-35,67,-79,67v-55,0,-90,-36,-90,-91v0,-54,35,-91,90,-91v52,0,80,33,80,95r-121,0v-6,71,82,79,90,20xm133,-107v-2,-31,-12,-45,-33,-45v-21,0,-35,15,-39,45r72,0", "w": 191 }, "8": { "d": "60,-105v-66,-38,-38,-120,51,-120v89,0,119,71,50,102v82,33,52,129,-49,129v-100,0,-134,-82,-52,-111xm86,-95v-48,17,-40,73,24,73v60,0,70,-42,25,-57xm135,-133v40,-17,34,-68,-22,-68v-52,0,-62,46,-19,57" }, "=": { "d": "255,-158r0,29r-210,0r0,-29r210,0xm255,-86r0,29r-210,0r0,-29r210,0", "w": 299 }, "!": { "d": "29,-21v0,-15,12,-26,27,-26v15,0,27,11,27,26v0,15,-12,27,-27,27v-15,0,-27,-12,-27,-27xm45,-69v-6,-82,-15,-132,-15,-150v0,-21,8,-30,27,-30v19,0,27,9,27,30v0,17,-10,66,-17,150r-22,0", "w": 112 }, "f": { "d": "41,-144r-33,0r0,-26r33,0v-1,-51,18,-79,61,-78v32,0,53,16,53,38v0,16,-10,26,-25,26v-25,0,-30,-35,-7,-40v-30,-19,-45,14,-39,54r37,0r0,26r-37,0r0,98v-3,24,15,22,37,22r0,24r-113,0r0,-24v21,1,33,0,33,-22r0,-98", "w": 134 }, "5": { "d": "49,-34v35,28,100,17,100,-39v0,-60,-68,-74,-98,-34r-24,-1r11,-117v46,16,106,16,153,1v-10,46,-69,57,-130,48r-3,33v61,-33,144,0,144,65v0,51,-35,84,-94,84v-56,0,-91,-26,-91,-60v0,-38,63,-45,63,-7v0,17,-12,27,-31,27" }, "4": { "d": "82,0r0,-26v22,0,45,3,40,-19r0,-16r-109,0r0,-27r120,-133r35,0r0,129r42,0r0,31r-42,0v0,21,-3,37,22,35r20,0r0,26r-128,0xm122,-92r1,-79r-71,79r70,0" }, "g": { "d": "49,-63v-50,-42,-19,-113,58,-113v22,0,42,5,58,16v21,-28,74,-18,74,20v0,15,-9,25,-23,25v-27,0,-33,-37,-6,-41v-14,-10,-26,-4,-36,10v38,63,-34,118,-109,92v-16,10,-11,25,14,24v59,-3,128,-2,128,50v0,37,-35,57,-102,57v-61,0,-92,-15,-92,-42v0,-15,10,-24,33,-30v-40,-10,-38,-57,3,-68xm72,-113v0,30,10,42,32,42v22,0,32,-13,32,-41v0,-30,-10,-43,-32,-43v-22,0,-32,14,-32,42xm103,9v-40,0,-59,4,-59,23v0,17,19,25,56,25v40,0,60,-9,60,-27v0,-18,-18,-21,-57,-21", "w": 238 }, "`": { "d": "127,-196v-37,2,-51,-19,-77,-28v-24,-8,-24,-39,1,-41v31,9,52,49,76,69", "w": 180 }, ">": { "d": "253,-121r0,28r-207,85r0,-32r165,-67r-165,-67r0,-33", "w": 299 }, "h": { "d": "39,-196v2,-21,-11,-21,-31,-21r0,-25r74,0r0,102v32,-51,120,-50,114,27r0,67v-2,21,10,23,31,22r0,24r-102,0r0,-24v46,8,28,-53,28,-89v0,-23,-7,-35,-27,-35v-40,0,-44,53,-44,102v0,20,8,23,28,22r0,24r-102,0r0,-24v20,1,31,0,31,-22r0,-150", "w": 233 }, "-": { "d": "13,-67r0,-38r98,0r0,38r-98,0", "w": 124 }, "i": { "d": "35,-218v0,-15,12,-26,27,-26v15,0,27,11,27,26v0,15,-12,27,-27,27v-15,0,-27,-12,-27,-27xm9,0r0,-24v21,1,34,1,34,-22r0,-78v3,-23,-13,-23,-34,-22r0,-24r78,0r0,124v-2,21,10,23,31,22r0,24r-109,0", "w": 126 }, "j": { "d": "41,-124v3,-23,-14,-23,-35,-22r0,-24r79,0r0,179v0,46,-17,68,-59,68v-30,0,-50,-16,-50,-37v0,-14,11,-25,26,-25v25,-1,29,40,2,40v24,11,37,0,37,-34r0,-145xm33,-218v0,-15,11,-26,26,-26v15,0,27,11,27,26v0,15,-12,27,-27,27v-15,0,-26,-12,-26,-27", "w": 114 }, "k": { "d": "82,-87v20,-18,45,-33,61,-54v-1,-8,-22,-4,-32,-5r0,-24r107,0r0,24v-37,-1,-48,27,-72,41v26,26,36,81,84,81r0,24r-104,0r0,-24v15,1,31,-3,18,-15r-28,-42r-34,27v-1,21,1,32,25,30r0,24r-99,0r0,-24v20,1,31,0,31,-22r0,-150v2,-21,-11,-21,-31,-21r0,-25r74,0r0,155", "w": 230 }, "l": { "d": "39,-196v2,-21,-11,-21,-31,-21r0,-25r75,0r0,196v-2,22,11,23,32,22r0,24r-107,0r0,-24v20,1,31,0,31,-22r0,-150", "w": 122 }, "<": { "d": "253,-174r-164,67r164,67r0,32r-207,-85r0,-28r207,-86r0,33", "w": 299 }, "m": { "d": "189,-141v34,-52,118,-45,109,28r0,67v-2,21,10,23,31,22r0,24r-99,0r0,-24v43,6,25,-55,25,-89v0,-24,-3,-35,-24,-35v-40,-1,-40,55,-40,102v0,19,5,23,25,22r0,24r-93,0r0,-24v43,6,25,-55,25,-89v0,-24,-4,-35,-25,-35v-40,-1,-39,56,-39,102v0,19,5,23,24,22r0,24r-100,0r0,-24v21,1,33,0,33,-22r0,-78v3,-22,-12,-23,-33,-22r0,-24r76,0r0,29v27,-42,87,-49,105,0", "w": 335 }, "n": { "d": "8,0r0,-24v21,1,33,0,33,-22r0,-78v3,-22,-12,-23,-33,-22r0,-24r76,0r0,30v32,-51,120,-50,114,27r0,67v-2,21,10,23,31,22r0,24r-102,0r0,-24v46,8,28,-53,28,-89v0,-23,-7,-35,-27,-35v-41,0,-44,53,-44,102v0,20,8,23,28,22r0,24r-104,0", "w": 235 }, "9": { "d": "147,-153v0,-30,-14,-46,-39,-46v-25,0,-39,16,-39,45v0,29,15,45,42,45v22,0,36,-17,36,-44xm69,-23v48,24,84,-6,81,-76v-47,43,-135,14,-135,-49v0,-46,36,-77,93,-77v62,0,96,41,96,112v0,75,-39,120,-105,120v-43,0,-70,-22,-70,-47v0,-16,12,-27,30,-27v29,-1,36,37,10,44" }, "#": { "d": "162,-257r-28,77r47,0r28,-77r32,0r-28,77r52,0r-11,29r-51,0r-16,46r54,0r-11,30r-54,0r-27,76r-32,0r27,-76r-47,0r-27,76r-32,0r27,-76r-53,0r11,-30r53,0r16,-46r-56,0r10,-29r56,0r28,-77r32,0xm172,-151r-49,0r-16,47r48,0", "w": 276 }, "o": { "d": "10,-85v0,-55,38,-91,96,-91v58,0,96,36,96,91v0,55,-38,91,-96,91v-58,0,-96,-36,-96,-91xm59,-85v0,44,16,66,47,66v31,0,47,-22,47,-66v0,-44,-16,-66,-47,-66v-31,0,-47,22,-47,66", "w": 212 }, "1": { "d": "51,0r0,-26v23,-1,44,5,44,-21r0,-115r-44,0r0,-26v33,-1,51,-10,62,-33r30,0r0,175v-5,26,21,19,43,20r0,26r-135,0" }, "p": { "d": "36,32r0,-156v2,-21,-9,-23,-30,-22r0,-24r73,0r0,30v34,-66,142,-34,131,56v10,90,-96,120,-131,56v6,35,-21,93,37,81r0,24r-112,0r0,-24v20,0,32,1,32,-21xm161,-85v0,-41,-13,-61,-41,-61v-24,0,-41,22,-41,61v0,39,17,60,41,60v28,0,41,-19,41,-60" }, "(": { "d": "127,47r0,23v-74,-19,-113,-74,-113,-160v0,-84,40,-140,113,-159r0,23v-42,17,-62,62,-62,136v0,75,19,120,62,137", "w": 139 }, ")": { "d": "12,47v43,-17,63,-62,63,-137v0,-74,-21,-119,-63,-136r0,-23v73,19,113,75,113,159v0,86,-39,141,-113,160r0,-23", "w": 139 }, "%": { "d": "11,-156v0,-41,28,-69,69,-69v41,0,69,28,69,69v0,41,-28,69,-69,69v-41,0,-69,-28,-69,-69xm51,-156v0,31,9,46,29,46v21,0,29,-15,29,-46v0,-31,-9,-47,-29,-47v-19,0,-29,16,-29,47xm255,-225r-135,231r-29,0r135,-231r29,0xm198,-63v0,-41,28,-69,69,-69v41,0,69,28,69,69v0,41,-28,69,-69,69v-41,0,-69,-28,-69,-69xm238,-63v0,31,9,46,29,46v21,0,28,-15,28,-46v0,-31,-8,-46,-28,-46v-19,0,-29,15,-29,46", "w": 346 }, ".": { "d": "29,-21v0,-15,12,-26,27,-26v15,0,27,11,27,26v0,15,-12,27,-27,27v-15,0,-27,-12,-27,-27", "w": 112 }, "+": { "d": "165,-215r0,93r90,0r0,29r-90,0r0,93r-30,0r0,-93r-90,0r0,-29r90,0r0,-93r30,0", "w": 299 }, "q": { "d": "64,-85v0,41,14,60,42,60v24,0,41,-21,41,-60v0,-39,-17,-61,-41,-61v-28,0,-42,20,-42,61xm190,32v-3,22,11,21,32,21r0,24r-112,0r0,-24v21,0,37,3,37,-21r0,-60v-35,65,-142,33,-132,-56v-10,-90,97,-122,132,-56r0,-30r73,0r0,24v-20,-1,-30,1,-30,22r0,156", "w": 227 }, "?": { "d": "53,-21v0,-15,12,-26,27,-26v15,0,27,11,27,26v0,15,-12,27,-27,27v-15,0,-27,-12,-27,-27xm172,-184v0,51,-84,65,-80,116r-23,0v-13,-55,51,-73,52,-114v0,-24,-18,-40,-45,-40v-26,0,-44,17,-45,42v15,-17,44,-7,44,15v0,15,-14,27,-31,27v-20,0,-36,-18,-36,-44v0,-37,32,-67,80,-67v52,0,84,30,84,65", "w": 180 }, "\"": { "d": "28,-150r-13,-88v0,-12,6,-19,16,-19v13,-1,20,10,17,26r-13,81r-7,0xm87,-150r-13,-88v0,-12,7,-19,17,-19v12,-1,18,12,16,26r-13,81r-7,0", "w": 122 }, "'": { "d": "28,-150r-13,-88v0,-12,6,-19,16,-19v13,-1,20,10,17,26r-13,81r-7,0", "w": 63 }, "r": { "d": "84,-91v0,34,-15,78,39,67r0,24r-115,0r0,-24v21,1,33,0,33,-22r0,-78v3,-22,-12,-23,-33,-22r0,-24r76,0r0,26v16,-44,85,-39,89,8v3,35,-53,43,-54,9v0,-12,8,-21,22,-25v-34,-15,-57,15,-57,61", "w": 178 }, "s": { "d": "11,2r0,-69r26,0v7,31,28,48,58,48v19,0,30,-10,30,-23v0,-20,-38,-26,-57,-29v-79,-13,-68,-107,11,-105v19,0,35,5,51,17r8,-13r21,0r0,63r-25,0v-7,-26,-26,-42,-52,-42v-32,0,-39,34,-7,39v43,8,98,23,93,63v5,56,-87,71,-127,36r-6,15r-24,0", "w": 178 }, ";": { "d": "29,-135v0,-15,12,-27,27,-27v15,0,27,12,27,27v0,15,-12,26,-27,26v-15,0,-27,-11,-27,-26xm28,52r0,-16v22,-6,34,-20,34,-41v-15,13,-38,3,-37,-17v0,-15,10,-25,27,-25v19,0,34,15,34,38v0,32,-22,55,-58,61", "w": 112 }, "7": { "d": "218,-219v-10,63,-97,125,-79,220r-50,0v-5,-98,37,-125,85,-180v-24,15,-60,2,-84,1v-27,-1,-35,19,-35,58r-24,0r0,-100r26,0r0,26v14,-19,27,-28,48,-28v37,-1,72,39,90,3r23,0" }, "6": { "d": "158,-194v-48,-25,-84,4,-83,73v49,-41,133,-11,133,53v0,43,-35,75,-92,75v-61,0,-97,-40,-97,-111v0,-75,40,-121,105,-121v45,0,73,22,73,47v0,16,-12,28,-29,28v-30,0,-37,-37,-10,-44xm76,-64v0,29,14,44,39,44v24,0,38,-16,38,-43v0,-30,-13,-46,-39,-46v-24,0,-38,16,-38,45" }, "\/": { "d": "18,33r-27,0r89,-282r27,0", "w": 106 }, "t": { "d": "79,6v-63,0,-41,-92,-45,-151r-28,0r0,-23v33,-5,46,-27,49,-69r23,0r0,67r47,0r0,25r-47,0r0,97v0,15,2,21,13,21v16,3,16,-25,16,-53r23,0v5,50,-9,86,-51,86", "w": 145 }, "3": { "d": "48,-36v26,30,100,20,100,-26v0,-30,-21,-43,-59,-42r0,-26v70,10,73,-72,12,-72v-15,0,-28,4,-40,13v14,1,22,11,22,24v0,14,-12,25,-29,25v-17,0,-29,-12,-29,-29v0,-30,33,-56,87,-56v96,0,116,93,31,107v40,7,60,27,60,57v0,39,-36,67,-99,67v-53,0,-87,-28,-87,-61v0,-21,13,-35,33,-35v17,0,28,12,28,28v0,16,-11,27,-30,26" }, "2": { "d": "146,6v-25,0,-65,-29,-89,-29v-12,0,-18,7,-20,24r-21,0v-10,-68,57,-98,102,-119v39,-19,28,-82,-25,-82v-21,0,-38,10,-46,28v18,-7,38,4,37,22v0,17,-12,28,-29,28v-20,0,-34,-16,-34,-38v0,-34,34,-65,84,-65v56,0,91,29,91,71v0,81,-128,53,-149,114v42,-34,133,45,134,-38r21,0v1,52,-20,84,-56,84" }, "u": { "d": "92,5v-67,0,-55,-68,-55,-129v0,-21,-9,-23,-29,-22r0,-24r73,0r0,113v0,23,6,35,26,35v41,0,49,-52,45,-102v4,-24,-16,-22,-38,-22r0,-24r81,0r0,124v-2,21,9,23,30,22r0,24r-73,0r0,-30v-19,23,-39,35,-60,35", "w": 233 }, "_": { "d": "180,55r0,30r-180,0r0,-30r180,0", "w": 180 }, "v": { "d": "76,0r-44,-127v-5,-16,-11,-21,-29,-19r0,-24r93,0r0,24v-20,-2,-22,8,-16,25r26,78r32,-93v1,-9,-13,-11,-25,-10r0,-24r84,0r0,24v-19,-1,-24,3,-31,22r-44,124r-46,0", "w": 199 }, "w": { "d": "74,0r-41,-125v-6,-17,-10,-22,-29,-21r0,-24r90,0r0,24v-19,-2,-24,5,-18,23r25,84r33,-96v1,-10,-11,-12,-23,-11r0,-24r87,0r0,24v-16,-1,-26,1,-20,20r29,89r30,-100v0,-8,-11,-10,-21,-9r0,-24r75,0r0,24v-18,-2,-21,5,-28,24r-41,122r-42,0r-31,-95r-32,95r-43,0", "w": 297 }, "x": { "d": "2,0r0,-24v41,0,61,-41,89,-60v-26,-20,-39,-62,-82,-62r0,-24r104,0r0,24v-14,-2,-23,3,-13,14r21,22v9,-9,25,-20,30,-30v1,-6,-12,-6,-20,-6r0,-24r91,0r0,24v-38,-1,-56,38,-81,55v27,21,44,67,87,67r0,24r-107,0r0,-24v15,1,29,-2,16,-14r-26,-26v-11,11,-28,22,-36,35v0,7,16,5,24,5r0,24r-97,0", "w": 232 }, "y": { "d": "92,0r-55,-124v-8,-19,-16,-23,-38,-22r0,-24r104,0r0,24v-15,-1,-30,1,-23,17r34,78r32,-85v2,-10,-14,-10,-26,-10r0,-24r87,0r0,24v-21,-2,-26,6,-35,26v-30,60,-57,197,-123,197v-30,0,-51,-20,-51,-45v0,-36,55,-44,55,-8v0,14,-11,22,-27,21v30,24,49,-2,66,-45", "w": 210 }, "z": { "d": "7,0r0,-26r110,-120v-47,0,-82,-7,-77,51r-26,0r0,-75r152,0r0,27r-107,119v53,0,85,7,82,-57r25,0r0,81r-159,0", "w": 181 }, "0": { "d": "11,-109v0,-69,42,-116,101,-116v59,0,102,47,102,116v0,69,-43,115,-102,115v-59,0,-101,-46,-101,-115xm67,-109v0,59,13,87,45,87v32,0,46,-28,46,-87v0,-59,-14,-88,-46,-88v-32,0,-45,29,-45,88" }, "\u00a0": { "w": 112}} });

// DEMOTIVE
if (!DEMOTIVE) { var DEMOTIVE = {}; }
DEMOTIVE.windowscroll = { init: function(opts) {
    if (opts) { var $els = opts; } else { var $els = jQuery('a[href^="#"], area[href^="#"]'); }
    $els.each(function(i) { if (jQuery(this).attr('href').length > 1) { jQuery(this).bind('click.windowscroll', function(e) { DEMOTIVE.windowscroll.scroll(jQuery(this)); e.preventDefault(); }); } });
}, scroll: function($el) { var targ = $el.attr('href'); var targY = jQuery(targ).offset().top; jQuery('html, body').animate({ scrollTop: targY }, 900, 'swing'); } 
}
DEMOTIVE.scroller = { opts: { speed: 300, scrollStyle: 'unit', behaviour: 'rewind', direction: 'horizontal', timer: 'false', interval: 3000, counter: 1 }, init: function($els, opts) {
    $els.each(function(i) {
        var $el = jQuery(this); var $itemEls = $el.find('.dem-items'); var $unitEls = $itemEls.children(); $el.data('units', $unitEls); var propsObj = {}; propsObj.speed = DEMOTIVE.scroller.opts.speed; propsObj.scrollStyle = DEMOTIVE.scroller.opts.scrollStyle; propsObj.behaviour = DEMOTIVE.scroller.opts.behaviour; propsObj.direction = DEMOTIVE.scroller.opts.direction; propsObj.timer = DEMOTIVE.scroller.opts.timer; propsObj.interval = DEMOTIVE.scroller.opts.interval; propsObj.counter = DEMOTIVE.scroller.opts.counter; if (opts) {
            if (opts.speed) { propsObj.speed = opts.speed; }
            if (opts.scrollStyle) { propsObj.scrollStyle = opts.scrollStyle; }
            if (opts.behaviour) { propsObj.behaviour = opts.behaviour; }
            if (opts.direction) { propsObj.direction = opts.direction; }
            if (opts.timer) { propsObj.timer = opts.timer; }
            if (opts.interval) { propsObj.interval = opts.interval; }
            if (opts.counter) { propsObj.counter = opts.counter; } 
        }
        $el.data('props', propsObj).addClass('dem-scroller-active'); $itemEls.css({ 'position': 'relative', 'overflow': 'hidden' }); if (propsObj.direction != 'vertical') { $itemEls.css('height', $unitEls.eq(0).outerHeight(true)); }
        if (propsObj.scrollStyle == 'group') {
            DEMOTIVE.scroller.checkMeasurements($el); var visUnits = $el.data('measurements').viewW / $el.data('measurements').unitW; var remainder = $unitEls.length % visUnits; if (remainder > 0) {
                var toCreate = visUnits - remainder; var elType = $unitEls[0].nodeName; var dW = $unitEls.eq(0).width(); var dH = $unitEls.eq(0).height(); for (var i = 0; i < toCreate; i++) { var newEl = jQuery('<' + elType + '/>').css({ 'width': dW, 'height': dH }).addClass('dem-unit-dummy'); $itemEls.children(':last').after(newEl); }
                $unitEls = $itemEls.children(); $el.data('units', $unitEls);
            } 
        }
        $unitEls.each(function(j) {
            var cssObj = {}; cssObj['position'] = 'absolute'; if (propsObj.direction == 'vertical') { cssObj['top'] = jQuery(this).outerHeight(true) * j; cssObj['left'] = '0'; } else { cssObj['top'] = '0', cssObj['left'] = jQuery(this).outerWidth(true) * j; }
            jQuery(this).css(cssObj);
        }); DEMOTIVE.scroller.toggleUnitDisplay($el); var $btnEls = $el.find('.dem-prev, .dem-next'); $btnEls.each(function(i) {
            if (this.tagName.toUpperCase() != 'A') { jQuery(this).wrapInner('<a href="#"></a>'); }
            jQuery(this).bind('click', function(e) { e.preventDefault(); }).bind('click.demScroll', function() { DEMOTIVE.scroller.step(jQuery(this)); }); if (jQuery(this).parents('.dem-scroller').data('props').behaviour == 'fixed') { DEMOTIVE.scroller.toggleControls(jQuery(this).parents('.dem-scroller')); } 
        }); $el.find('.dem-counter').text(propsObj.counter); if (propsObj.timer == 'true') { DEMOTIVE.scroller.timerSet($el); } 
    });
}, step: function($el) {
    var $scrollEl = $el.parents('.dem-scroller'); if ($scrollEl.data('props').timer == 'true') { DEMOTIVE.scroller.timerClear($scrollEl); }
    var $els = $scrollEl.find('.dem-prev, .dem-next'); $els.unbind('click.demScroll'); var dir = 'pos'; if ($el.hasClass('dem-prev')) { dir = 'neg'; }
    if ($scrollEl.data('props').behaviour == 'loop') { DEMOTIVE.scroller.updateStack($scrollEl, dir); }
    DEMOTIVE.scroller.checkMeasurements($scrollEl); var scrollDist = $scrollEl.data('measurements').unitW; var sStyle = $scrollEl.data('props').scrollStyle; if (sStyle == 'group') { scrollDist = $scrollEl.data('measurements').viewW; }
    if ($scrollEl.find('.dem-counter').length > 0) {
        var currNum = parseInt($scrollEl.find('.dem-counter').eq(0).text()); if (dir == 'pos') { currNum++; } else { currNum--; }
        $scrollEl.find('.dem-counter').text(currNum);
    }
    if ($scrollEl.data('props').behaviour == 'rewind') {
        if (($scrollEl.data('measurements').indexPos == 0) && (dir == 'neg')) { scrollDist = $scrollEl.data('measurements').overW - $scrollEl.data('measurements').viewW; dir = 'pos'; $scrollEl.find('.dem-counter').text($scrollEl.find('.dem-items > li').length); }
        if ((Math.round(Math.abs($scrollEl.data('measurements').indexPos) + $scrollEl.data('measurements').viewW) == $scrollEl.data('measurements').overW) && (dir == 'pos')) { scrollDist = Math.abs($scrollEl.data('measurements').indexPos); dir = 'neg'; $scrollEl.find('.dem-counter').text('1'); } 
    }
    var $units = $scrollEl.data('units'); if ($scrollEl.data('props').direction == 'vertical') {
        $units.each(function(i) {
            var pos = parseInt(jQuery(this).css('top')); if (dir == 'neg') { var unitX = Math.round(pos) + scrollDist; } else { var unitX = Math.round(pos) - scrollDist; }
            var mySpeed = $scrollEl.data('props').speed; if (i < ($units.length - 1)) { jQuery(this).stop().animate({ 'top': unitX }, mySpeed); } else {
                jQuery(this).stop().animate({ 'top': unitX }, mySpeed, function() {
                    $els.bind('click.demScroll', function() { DEMOTIVE.scroller.step(jQuery(this)); }); DEMOTIVE.scroller.toggleUnitDisplay($scrollEl); if ($scrollEl.data('props').behaviour == 'fixed') { DEMOTIVE.scroller.toggleControls($scrollEl); }
                    if ($scrollEl.data('props').timer == 'true') { DEMOTIVE.scroller.timerSet($scrollEl); } 
                });
            } 
        });
    } else {
        $units.each(function(i) {
            var pos = parseInt(jQuery(this).css('left')); if (dir == 'neg') { var unitX = Math.round(pos) + scrollDist; } else { var unitX = Math.round(pos) - scrollDist; }
            var mySpeed = $scrollEl.data('props').speed; if (i < ($units.length - 1)) { jQuery(this).stop().animate({ 'left': unitX }, mySpeed); } else {
                jQuery(this).stop().animate({ 'left': unitX }, mySpeed, function() {
                    $els.bind('click.demScroll', function() { DEMOTIVE.scroller.step(jQuery(this)); }); DEMOTIVE.scroller.toggleUnitDisplay($scrollEl); if ($scrollEl.data('props').behaviour == 'fixed') { DEMOTIVE.scroller.toggleControls($scrollEl); }
                    if ($scrollEl.data('props').timer == 'true') { DEMOTIVE.scroller.timerSet($scrollEl); } 
                });
            } 
        });
    } 
}, checkMeasurements: function($el) {
    var $units = $el.data('units'); var dataObj = {}; if ($el.data('props').direction == 'vertical') { dataObj.indexPos = parseInt($units.eq(0).css('top')); dataObj.unitW = $units.eq(0).outerHeight(true); dataObj.overW = dataObj.unitW * $units.length; dataObj.viewW = $units.eq(0).parent().height(); } else { dataObj.indexPos = parseInt($units.eq(0).css('left')); dataObj.unitW = $units.eq(0).outerWidth(true); dataObj.overW = dataObj.unitW * $units.length; dataObj.viewW = $units.eq(0).parent().width(); }
    $el.data('measurements', dataObj);
}, toggleUnitDisplay: function($el) {
    DEMOTIVE.scroller.checkMeasurements($el); $el.data('units').each(function(i) {
        if ($el.data('props').direction == 'vertical') { var pos = parseInt(jQuery(this).css('top')); } else { var pos = parseInt(jQuery(this).css('left')); }
        if ((pos < 0) || (pos >= $el.data('measurements').viewW)) { jQuery(this).find('a').attr('tabindex', '-1'); } else { jQuery(this).find('a').removeAttr('tabindex'); } 
    });
}, toggleControls: function($el) { DEMOTIVE.scroller.checkMeasurements($el); if ($el.data('measurements').indexPos == 0) { $el.find('.dem-prev').unbind('click.demScroll').addClass('dem-disabled'); } else if (Math.round(Math.abs($el.data('measurements').indexPos) + $el.data('measurements').viewW) == $el.data('measurements').overW) { $el.find('.dem-next').unbind('click.demScroll').addClass('dem-disabled'); } else { $el.find('.dem-next, .dem-prev').bind('click.demScroll', function() { DEMOTIVE.scroller.step(jQuery(this)); }).removeClass('dem-disabled'); } }, updateStack: function($el, dir) {
    DEMOTIVE.scroller.checkMeasurements($el); var animDir = 'left'; if ($el.data('props').direction == 'vertical') { animDir = 'top'; }
    if (($el.data('measurements').indexPos == 0) && (dir == 'neg')) {
        var $units = $el.data('units'); if ($el.data('props').scrollStyle != 'group') { $units.filter(':last').insertBefore($units.eq(0)).css(animDir, (0 - $el.data('measurements').unitW) + 'px'); } else { var numEls = $el.data('measurements').viewW / $el.data('measurements').unitW; var c = 0; for (var i = $units.length; i >= ($units.length - numEls); i--) { var num = $el.data('measurements').unitW * c; num = String('-' + num + 'px'); $units.eq(i).insertBefore($el.find('.dem-items').children(':first-child')).css(animDir, num); c++; } }
        $el.data('units', $el.find('.dem-items').children());
    } else if ((Math.round(Math.abs($el.data('measurements').indexPos) + $el.data('measurements').viewW) == $el.data('measurements').overW) && (dir == 'pos')) {
        var $units = $el.data('units'); if ($el.data('props').scrollStyle != 'group') { $units.eq(0).insertAfter($units.filter(':last')).css(animDir, $el.data('measurements').viewW + 'px'); } else { var numEls = $el.data('measurements').viewW / $el.data('measurements').unitW; for (var i = 0; i < numEls; i++) { var num = $el.data('measurements').viewW + ($el.data('measurements').unitW * i); num = String(num + 'px'); $units.eq(i).insertAfter($el.find('.dem-items').children(':last')).css(animDir, num); } }
        $el.data('units', $el.find('.dem-items').children());
    } 
}, timerSet: function($el) { intervalID = window.setTimeout(function() { $el.find('.dem-next').click(); }, $el.data('props').interval); $el.data('intervalID', intervalID); }, timerClear: function($el) { clearTimeout($el.data('intervalID')); $el.data('intervalID', ''); } 
}
DEMOTIVE.scroller.toggle = { opts: { messageOn: 'Just <a href="#" onclick="">show all recent work</a>', messageOff: 'Okay, turn the <a href="#">slides back on</a>' }, toggleOut: function($el) { $el.find('.dem-control').animate({ opacity: 0 }, 300, function() { $(this).find('li:first').hide(); $('#dem-toggle').html(DEMOTIVE.scroller.toggle.opts.messageOff).addClass('all'); $('#dem-toggle > a').click(function(e) { e.preventDefault(); DEMOTIVE.scroller.toggle.toggleIn($(this).parents('.dem-scroller')); }); $(this).animate({ opacity: 1 }, 300); }); var currH = $el.find('.dem-items').height(); var targH = currH * $el.find('.dem-items > li').length; $el.find('.dem-items').eq(0).animate({ height: targH }, 900); var indexItem = $el.find('.dem-items > li:first'); if (parseInt(indexItem.css('top')) < 0) { var hDiff = Math.abs(parseInt(indexItem.css('top'))); $el.find('.dem-items > li').each(function(i) { var myDiff = parseInt($(this).css('top')) + hDiff; $(this).animate({ top: myDiff }, 600); }); } }, toggleIn: function($el) { $el.find('.dem-control').animate({ opacity: 0 }, 300, function() { $(this).find('li:first').show().find('.dem-counter').text('1'); $('#dem-toggle').html(DEMOTIVE.scroller.toggle.opts.messageOn).removeClass('all'); $('#dem-toggle > a').click(function(e) { e.preventDefault(); DEMOTIVE.scroller.toggle.toggleOut($(this).parents('.dem-scroller')); }); $(this).animate({ opacity: 1 }, 300); }); var targH = $el.find('.dem-items > li:first').outerHeight(true); $el.find('.dem-items').eq(0).animate({ height: targH }, 900); } }
$(document).ready(function() {
    $('body').addClass('js-enabled'); var controlBlock = '<ul class="dem-control">\
  <li>\
   <a href="#" onclick="" class="dem-prev">Prev</a>\
   <span class="dem-counter">1</span> of <span>' + $('.dem-items > li').length + '</span>\
   <a href="#" onclick="" class="dem-next">Next</a>\
  </li>\
  <li id="dem-toggle">Just <a href="#">show all recent work</a></li>\
 </ul>'; $('.dem-scroller').prepend(controlBlock); DEMOTIVE.windowscroll.init(); DEMOTIVE.scroller.init($('.dem-scroller').eq(0), { direction: 'vertical', speed: 600 }); $('#dem-toggle > a').click(function(e) { e.preventDefault(); DEMOTIVE.scroller.toggle.toggleOut($(this).parents('.dem-scroller')); }); $('#contact_form').submit(function() {
     $('#contact_form li').removeClass('error'); var passed = true; $('#contact_form ul li input, #contact_form ul li textarea').each(function(i) {
         if ($(this).val() == '') { $(this).parents('li').addClass('error'); passed = false; }
         if ($(this).attr('id') == 'contact_email' && $(this).val() != '') { if ($(this).val().indexOf('@') == -1 || $(this).val().indexOf('.') == -1) { $(this).parents('li').addClass('error'); passed = false; } } 
     }); if (passed == false && $('#contact_form p.error').length == 0) { $('#contact_form').prepend('<p class="error">Eh? You gotta do <em>all</em> theseâ€¦ <small>and get the email to at least <em>look</em> right</small></p>'); $('#contact_form p.error').hide().fadeIn('slow'); }
     return passed;
 });
}); Cufon.set('fontFamily', 'clarendon').replace('.main-nav a')('.section > h2')('.article > h3')('#feed h4');